package com.ringtheweb.service;

import com.ringtheweb.model.RoleType;
import com.ringtheweb.model.User;
import com.ringtheweb.service.exception.NonUniqueLoginException;
import com.ringtheweb.service.exception.RoleNotFoundException;

/**
 * A {@link User} manager.
 * @author ldewavri
 *
 */
public interface IUserManager {
	
	
	/**
	 * Save a given user and affect him a role.
	 * @param user the user to save (as a value object)
	 * @param roleName its role's name
	 * @return the saved user.
	 * @throws NonUniqueLoginException
	 * @throws {@link RoleNotFoundException}
	 */
	public User saveUserInRole(User user,RoleType roleName) throws NonUniqueLoginException,
		RoleNotFoundException;
	

}
